<template>
  <div class="alipay">
    <form id="alipaysubmit" name="alipaysubmit" action="https://openapi.alipay.com/gateway.do" method="POST">
      <input v-model="alipayData.app_id" type="hidden" name="app_id">
      <input v-model="alipayData.method" type="hidden" name="method">
      <input v-model="alipayData.format" type="hidden" name="format">
      <input v-model="alipayData.charset" type="hidden" name="charset">
      <input v-model="alipayData.sign_type" type="hidden" name="sign_type">
      <input v-model="alipayData.version" type="hidden" name="version">
      <input v-model="alipayData.return_url" type="hidden" name="return_url">
      <input v-model="alipayData.notify_url" type="hidden" name="notify_url">
      <input v-model="alipayData.timestamp" type="hidden" name="timestamp">
      <input v-model="alipayData.sign" type="hidden" name="sign">
      <input v-model="alipayData.biz_content" type="hidden" name="biz_content">
      <input type="submit" value="ok" style="display:none;">
    </form>
  </div>
</template>

<script>
export default {
  name: 'AlipayCase',
  data() {
    return {
      alipayData: {
        app_id: '',
        biz_content: undefined,
        charset: '',
        format: '',
        method: '',
        notify_url: '',
        return_url: '',
        sign: '',
        sign_type: '',
        timestamp: '',
        version: ''
      }
    }
  },
  methods: {
    submitData() {
      // console.log(this.alipayData)
      setTimeout(() => {
        document.forms['alipaysubmit'].submit()
      }, 300)
    }
  }
}
</script>

<style scoped>

</style>
